package com.louis.util;

/**
 * <p>
 * ArrayUtils
 * </p>
 * 
 * @author louisjiang
 * @Datetime Aug 4, 2011 9:26:17 AM
 * @version 1.0.0
 */
public final class ArrayUtil {

	public static boolean hasArray(Object[] array) {
		return array != null && array.length > 0;
	}

	public static boolean equals(Object[] array1, Object[] array2) {
		boolean flag = false;
		if (array1 != null && array2 != null && array1.length == array2.length) {
			flag = true;
			for (int i = 0; i < array1.length; i++) {
				if (!array1[i].equals(array2[i])) {
					flag = false;
					break;
				}
			}
		} else if (array1 == null && array2 == null) {
			flag = true;
		}
		return flag;
	}

}
